#ifndef numuCCSelection_h
#define numuCCSelection_h

#include "SelectionBase.hxx"
#include "Parameters.hxx"

class numuCCSelection: public SelectionBase{
 public:
  numuCCSelection(bool forceBreak=true);
  virtual ~numuCCSelection(){}

  //---- These are mandatory functions
  void DefineSteps();
  AnaBoxB* MakeBox() {return new AnaBoxB();}
  bool FillEventSummary(const AnaBoxB& box, AnaEventB& event, Int_t allCutsPassed[]);
  nd280Samples::SampleEnum GetSampleEnum(){return nd280Samples::kFGD1NuMuCC;}
};

class FillSummaryAction_numuCC: public StepBase{
public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;  
  StepBase* MakeClone(){return new FillSummaryAction_numuCC();}
};

class TrackQualityFiducialCut: public StepBase{
 public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new TrackQualityFiducialCut();}
};

class TotalMultiplicityCut: public StepBase{
 public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new TotalMultiplicityCut();}
};


class MuonPIDCut: public StepBase{
 public:
  MuonPIDCut(){
      _prod5Cut = (bool) ND::params().GetParameterI("psycheSelections.numuCCMultiPi.Prod5Cuts");
  }
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new MuonPIDCut();}
 private:
  bool _prod5Cut;
};

class ExternalVetoCut: public StepBase{
 public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new ExternalVetoCut();}
};

class DeltaZCut: public StepBase{
 public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new DeltaZCut();}
};

class ExternalFGD1lastlayersCut: public StepBase{
 public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new ExternalFGD1lastlayersCut();}
};

/// Leading tracks with good quality in FGD1
class FindLeadingTracksAction: public StepBase{
 public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new FindLeadingTracksAction();}
};

  /// Find the Vertex. For the moment it's just the Star position of the HM track
class FindVertexAction: public StepBase{
 public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new FindVertexAction();}
};


class FindVetoTrackAction: public StepBase{
 public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new FindVetoTrackAction();}
};

class FindOOFVTrackAction: public StepBase{
 public:
  using StepBase::Apply;
  bool Apply(const AnaEventB& event, AnaBoxB& box) const;
  StepBase* MakeClone(){return new FindOOFVTrackAction();}
};


#endif
